﻿

using System;

namespace Sharp.Portal
{
    /// <summary>
    /// 主数据
    /// </summary>
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
    public class MasterDataAttribute : System.Attribute
    {
        /// <summary>
        /// 主数据
        /// </summary>
        /// <param name="category">分类</param>
        public MasterDataAttribute(string category)
        {
            this.Category = category;
        }
        /// <summary>
        /// 主数据
        /// </summary>
        /// <param name="category">分类</param>
        /// <param name="isTree">是否树形</param>
        public MasterDataAttribute(string category, bool isTree)
        {
            this.Category = category;
            IsTree = isTree;
        }
        /// <summary>
        /// 分类
        /// </summary>
        public string Category { get; set; }
        /// <summary>
        /// 是否树形
        /// </summary>
        public bool IsTree { get; set; }
    }
}
